package cn.exrick.xboot.supervisionDepartment.controllerImpl

import cn.exrick.xboot.base.entity.AdministrativeOffice
import cn.exrick.xboot.base.service.IAdministrativeOfficeService
import cn.exrick.xboot.base.vo.AdministrativeOfficeVo
import cn.exrick.xboot.core.common.utils.ResultUtil
import cn.exrick.xboot.core.common.vo.PageVo
import cn.exrick.xboot.core.common.vo.Result
import cn.exrick.xboot.supervisionDepartment.controller.ISupervisionDepartmentController
import com.baomidou.mybatisplus.core.metadata.IPage
import lombok.SneakyThrows
import org.springframework.web.bind.annotation.RestController
import javax.annotation.Resource

@RestController
open class AdministrativeOfficeController: ISupervisionDepartmentController.IAdministrativeOffice {

    @Resource
    private lateinit var iAdministrativeOffice:IAdministrativeOfficeService


    override fun getByPage(pageVo: PageVo,administrativeOffice: AdministrativeOffice?): Result<MutableMap<String, Any?>>? {

        return iAdministrativeOffice.getByPage(pageVo, administrativeOffice)
    }

    override fun createOrUpdateOffice(administrativeOffice: AdministrativeOffice?): Result<Any?>? {

        return iAdministrativeOffice.createOrUpdateOffice(administrativeOffice)
    }

    override fun removeOffice(ids: Array<out String>): Result<Any?>? {

        return iAdministrativeOffice.removeOffice(ids)
    }


    override fun getOfficeVoList(): Result<MutableList<AdministrativeOfficeVo>?>? {

        return iAdministrativeOffice.officeVoList()
    }

}